package gui;

import java.awt.Color;
import javax.swing.Icon;
import javax.swing.ImageIcon;
import javax.swing.JPanel;
import javax.swing.JLabel;
import java.awt.Font;
import javax.swing.JButton;
import java.awt.event.ActionListener;
import javax.swing.SwingConstants;

//		Menu screen
public class Menu extends JPanel {

	private JLabel lblWelcome;
	private JButton btnTransfer;
	private JLabel labelMinilogo;
	private JButton btnLogout;
	private JLabel lblYourCurrentBalance;
	private JLabel lblBTC;
	private JLabel labelOfficialLogo;
	private JLabel lblDKK;
	private JButton btnTransferToUser;

	public Menu() {

		setBounds(0, 0, 624, 921);
		setBackground(new Color(135, 206, 235));
		setLayout(null);

		lblWelcome = new JLabel();
		lblWelcome.setHorizontalAlignment(SwingConstants.CENTER);
		lblWelcome.setForeground(Color.DARK_GRAY);
		lblWelcome.setFont(new Font("Calibri Light", Font.PLAIN, 50));
		lblWelcome.setBounds(10, 150, 604, 61);
		add(lblWelcome);

		btnTransfer = new JButton("Deposit Bitcoins");
		btnTransfer.setBackground(new Color(95, 158, 160));
		btnTransfer.setForeground(Color.WHITE);
		btnTransfer.setFont(new Font("Calibri Light", Font.PLAIN, 60));
		btnTransfer.setBounds(55, 480, 509, 126);
		add(btnTransfer);

		Icon minilogo = new ImageIcon(getClass().getResource(
				"LOGOHIGHsmall.png"));
		labelMinilogo = new JLabel(" ");
		labelMinilogo.setBounds(527, 11, 87, 91);
		labelMinilogo.setIcon(minilogo);
		add(labelMinilogo);

		btnLogout = new JButton("Logout");
		btnLogout.setBackground(new Color(255, 69, 0));
		btnLogout.setForeground(Color.WHITE);
		btnLogout.setFont(new Font("Calibri Light", Font.PLAIN, 45));
		btnLogout.setBounds(0, 778, 624, 143);
		add(btnLogout);

		lblYourCurrentBalance = new JLabel("Your current balance is:");
		lblYourCurrentBalance.setHorizontalAlignment(SwingConstants.CENTER);
		lblYourCurrentBalance.setForeground(Color.DARK_GRAY);
		lblYourCurrentBalance
				.setFont(new Font("Calibri Light", Font.PLAIN, 50));
		lblYourCurrentBalance.setBounds(10, 250, 604, 61);
		add(lblYourCurrentBalance);

		lblBTC = new JLabel("<amount> BTC");
		lblBTC.setHorizontalAlignment(SwingConstants.CENTER);
		lblBTC.setForeground(Color.DARK_GRAY);
		lblBTC.setFont(new Font("Calibri Light", Font.PLAIN, 50));
		lblBTC.setBounds(10, 309, 604, 61);
		add(lblBTC);

		Icon officiallogo = new ImageIcon(getClass().getResource(
				"bitcoinofficiallogo.png"));
		labelOfficialLogo = new JLabel("");
		labelOfficialLogo.setBounds(10, 35, 120, 25);
		labelOfficialLogo.setIcon(officiallogo);
		add(labelOfficialLogo);

		lblDKK = new JLabel("<amount> DKK");
		lblDKK.setHorizontalAlignment(SwingConstants.CENTER);
		lblDKK.setForeground(Color.DARK_GRAY);
		lblDKK.setFont(new Font("Calibri Light", Font.PLAIN, 50));
		lblDKK.setBounds(10, 360, 604, 61);
		add(lblDKK);

		btnTransferToUser = new JButton("Transfer Bitcoins");
		btnTransferToUser.setForeground(Color.WHITE);
		btnTransferToUser.setFont(new Font("Calibri Light", Font.PLAIN, 60));
		btnTransferToUser.setBackground(new Color(95, 158, 160));
		btnTransferToUser.setBounds(55, 618, 509, 126);
		add(btnTransferToUser);
	}

	public JButton getBtnTransferToUser() {
		return btnTransferToUser;
	}

	public JLabel getWelcome() {
		return lblWelcome;
	}

	public JLabel getCurrencyBTC() {
		return lblBTC;
	}

	public JLabel getCurrencyDKK() {
		return lblDKK;
	}

	public JButton getLogout() {
		return btnLogout;
	}

	public JButton getTransfer() {
		return btnTransfer;
	}

	public void addActionListener(ActionListener charizard) {
		btnLogout.addActionListener(charizard);
		btnTransfer.addActionListener(charizard);
		btnTransferToUser.addActionListener(charizard);
	}
}
